package com.example.sonone.config;


/**
 * 多数据源key 缓存类  根据当前线程来选择具体的数据源
 * Created by 爆裂无球 on 2019/4/16.
 */

public class MultiDataSourceHolder {

    private static final ThreadLocal<String> tableIndexHolder = new ThreadLocal<>();

    public static String getTableIndex() {
        return tableIndexHolder.get();
    }

    public static void setTableIndex(String tableIndex) {
        tableIndexHolder.set(tableIndex);
    }


}
